<template>
	<div id="center" class="centerbox wrap_common">
		<!-- 用户资料 -->
		<div class="module_wrap userInfo_wrap">
			<div class="userInfo_wrap_top">
				<div class="attr_wrap">
					<img :src="`${userInfo.user_picture}?x-oss-process=image/resize,m_fill,h_210,w_210`" alt/>
				</div>
				<div class="user_info_wrap">
					<div class="user_name_wrap">
						<div class="user_name ellipsis_line_com">{{ userInfo.nick_name }}</div>
						<div class="user_vip" v-if="$util.shieldReview()" @click="jumpVipFn">
							<img v-if="userInfo.vip_level == 0" :src="`${constant.imgUrl}publicicon/icon_vipwei.png`"
								 alt/>
							<img v-else :src="`${constant.imgUrl}publicicon/icon_vipkai.png`" alt/>
						</div>
					</div>
					<div>{{ userInfo.city_name }}
						<text class="separate_text" v-if="userInfo.city_name&&userInfo.role_name">|</text>
						{{ userInfo.role_name }}
					</div>
                    <div v-if="!$util.isEmpty(userInfo.company_account)">【{{userInfo.company_account}}】子账号</div>
					<div class="user_info">
						<div class="user_info_left">
							<progress :percent="orderUserData.congig_percentage" stroke-width="4"
									  activeColor="#FF554F"/>
							<span class="speed">{{orderUserData.congig_percentage}}%  (资料完整度)</span>
						</div>
						<div class="wirte_all"
							  :class="{'text_main_color' : (orderUserData.congig_percentage != '100') }"
							  @click="toDecoration">
							<span>{{ (orderUserData.congig_percentage != '100') ? '去完善' : '修改资料' }}</span>
							<i class="iconfont iconjiantou"></i>
						</div>
					</div>
				</div>
			</div>
			<div class="userInfo_wrap_bottom">
				<div class="task_wrap" v-if="$util.shieldReview()">
					<swiper class="task_scroll_wrap" :autoplay="true" :interval="4000" duration="1000" :circular="true"
							:vertical="true" :skip-hidden-item-layout="true">
						<swiper-item class="list_item_wrap" v-for="(item,index)  in scrollData" :key="index">
							<div class="list_item">
								<div class="list_item_left">
									<i class="iconfont iconxiaoxituisong"></i>
									<span>{{ item.text }}</span>
								</div>
								<div class="task_btn" @click="skiptomission">
									<span>立即完成</span>
									<i class="iconfont iconjiantou"></i>
								</div>
							</div>
						</swiper-item>
					</swiper>
				</div>
			</div>
		</div>
		<!-- 订单管理 -->
		<div class="module_wrap order_wrap" v-if="userInfo.role_id == 2">
			<div class="module_title_wrap">
				<div class="module_title_text">订单管理</div>
				<div class="module_title_more" @click="jumporder()">
					<span>查看所有订单</span>
					<text class="iconfont iconjiantou"></text>
				</div>
			</div>
			<div class="module_content_wrap">
				<div class="order_con_top">
					<div class="order_list" v-for="(item,index)  in orderData" :key="index" @click="goOrder(item)">
						<span class="text_main_color"> {{item.value}}</span>
						<div class="orderName">{{ item.name }}</div>
					</div>
				</div>
				<div class="mater_con_bottom">
					<div class="mater_wrap" v-for="(item,index)  in orderMenuData" :key="index"
						 @click="jumpMenuFn(item)">
						<div class="mater_wrap_left">
							<div class="text_sub_com">{{ item.name }}</div>
							<div class="num_text">
								<span v-if="item.textType">{{ item.text }}</span>
								<span>{{ item.value }}</span>
								<span v-if="!item.textType">{{ item.text }}</span>
							</div>
						</div>
						<div class="text_sub_com">
							<i v-if="item.url" class="iconfont iconjiantou"></i>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- 预约单管理 -->
		<div class="module_wrap order_wrap" v-else-if="$util.shieldReview()">
			<div class="module_title_wrap">
				<div class="module_title_text">我的钱包</div>
				<!-- <div class="module_title_more" @click="skiptoclient">
					<span>查看所有预约单</span>
					<i class="iconfont iconjiantou"></i>
				</div> -->
			</div>
			<div class="module_content_wrap">
				<!-- <div class="order_con_top">
					<div class="order_list" v-for="(item,index)  in reservationData" :key="index"
						 @click="jumpMenuFn(item)">
						<span class="text_main_color"> {{item.value}}</span>
						<div class="orderName">{{ item.name }}</div>
					</div>
				</div> -->
				<div class="order_con_bottom">
					<div class="commission_left_wrp" @click="jumpWithdraw">
						<div>
							<span>￥我的余额(元)</span>
							<i class="iconfont iconjiantou"></i>
						</div>
						<div class="commission_price">{{ moneyData.seller_money|| 0.00 }}</div>
						<div>
							<span>累计获得佣金(元)</span>
							<span class="commission_num">{{ userInfo.user_money || 0.00 }}</span>
						</div>
					</div>
					<div class="commission_right_wrp" @click="jumpincomecast">
						<div>
							<span>我的积分</span>
							<i class="iconfont iconjiantou"></i>
						</div>
						<div class="commission_price">{{ userInfo.pay_points || 0.00 }}</div>
						<div>
							<span>积分充值</span>
							<i class="iconfont iconjiantou"></i>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- vip块 -->
		<div class="module_wrap vip_wrap" @click="jumpVipFn" v-if="userInfo.vip_level == 0 && $util.shieldReview()">
			<img :src="`${constant.imgUrl}center/open_vip_img.png`" alt mode="widthFix" />
		</div>
		<!-- 店铺管理 -->
		<div class="module_wrap content_wrap" v-if="userInfo.role_id == 2">
			<div class="module_title_wrap">
				<div class="module_title_text">用户中心</div>
				<div class="module_title_more" @click="jumpOtherUser(userInfo.user_id, userInfo.role_id)">
					<i class="iconfont iconqiye company_index"></i>
					<span>>用户主页</span>
				</div>
			</div>
			<div class="module_content_wrap">
				<div class="menu_btn_wrap">
					<div class="menu_list" v-for="(item,index)  in menuData.shopData"
						 :key="index" @click="jumpMenuFn(item)">
						<div class="menu_list_img">
							<img :src="item.img" alt/>
						</div>
						<div>{{ item.name }}</div>
					</div>
				</div>
			</div>
		</div>
		<!-- 内容管理 -->
		<div class="module_wrap content_wrap" v-else>
			<div class="module_title_wrap">
				<div class="module_title_text">内容管理</div>
			</div>
			<div class="module_content_wrap">
				<div class="menu_btn_wrap">
					<div class="menu_list" v-for="(item,index)  in menuData.conData"
								:key="index" v-if="item.judge()" @click="jumpMenuFn(item)">
						<div class="menu_list_img">
							<img :src="item.img" alt/>
						</div>
						<div>{{ item.name }}</div>
					</div>
				</div>
			</div>
		</div>
		<!-- 活动管理 -->
		<!-- <div class="module_wrap content_wrap" v-if="userInfo.role_id == 1">
			<div class="module_title_wrap">
				<div class="module_title_text">活动管理</div>
			</div>
			<div class="module_content_wrap">
				<div class="menu_btn_wrap">
					<div class="menu_list" v-for="(item,index)  in menuData.activeData" :key="index"
						@click="jumpMenuFn(item)">
						<div class="menu_list_img">
							<img :src="item.img" alt/>
						</div>
						<div>{{ item.name }}</div>
					</div>
				</div>
			</div>
		</div> -->
		<!-- 企业管理 -->
		<div class="module_wrap content_wrap" v-if="userInfo.role_id == 1 || userInfo.role_id == 2">
			<div class="module_title_wrap">
				<div class="module_title_text">团队管理</div>
			</div>
			<div class="module_content_wrap">
				<div class="menu_btn_wrap">
					<div class="menu_list" v-if="item.judge()" v-for="(item,index)  in menuData.companyData" :key="index"
						 @click="jumpMenuFn(item)">
						<div class="menu_list_img">
							<img :src="item.img" alt/>
						</div>
						<div>{{ item.name }}</div>
					</div>
				</div>
			</div>
		</div>
        <!-- 订单管理 -->
        <div class="module_wrap order_wrap" v-if="userInfo.role_id != 2 && $util.shieldReview()">
            <div class="module_title_wrap">
                <div class="module_title_text">订单管理</div>
                <router-link :to="{name: 'OrderManage', query: {owner_user_id: userInfo.user_id}}">
                    <div class="module_title_more">
                        <span>查看所有订单</span>
                        <i class="iconfont iconjiantou"></i>
                    </div>
                </router-link>
            </div>
            <div class="module_content_wrap">
                <div class="order_con_top">
                    <div class="order_list" v-for="(item, index) in orderData" :key="index" @click="jumpMenuFn(item)">
                        <!-- <CountTo class="text_main_color" :startVal="0" :endVal="item.value" :duration="2000"></CountTo> -->
						<span class="text_main_color"> {{item.value}}</span>
                        <div class="orderName">{{ item.name }}</div>
                    </div>
                </div>
                <div class="mater_con_bottom">
                    <div class="mater_wrap" v-if="item.show" v-for="(item, index) in orderMenuData" :key="index" @click="jumpMenuFn(item)">
                        <div class="mater_wrap_left">
                            <div class="text_sub_com">{{ item.name }}</div>
                            <div class="num_text">
                                <span v-if="item.textType">{{ item.text }}</span>
                                <span>{{ item.value }}</span>
                                <span v-if="!item.textType">{{ item.text }}</span>
                            </div>
                        </div>
                        <div class="text_sub_com">
                            <i v-if="item.url" class="iconfont iconjiantou"></i>
                        </div>
                    </div>
                </div>
            </div>
        </div>
		<!-- 帮助中心 -->
		<div class="module_wrap content_wrap">
			<div class="module_title_wrap">
				<div class="module_title_text">帮助中心</div>
			</div>
			<div class="module_content_wrap">
				<div class="menu_btn_wrap">
					<div class="menu_list" v-if="item.judge()" v-for="(item,index)  in menuData.helpData" :key="index"
						 @click="jumpMenuFn(item)">
						<!-- <a :href="item.href || 'javascript:;'"> -->
							<div class="menu_list_img">
								<img :src="item.img" alt/>
							</div>
							<div>{{ item.name }}</div>
						<!-- </a> -->
					</div>
				</div>
			</div>
		</div>
		<footer class="main-footer">
			<!-- <v-normalFooter v-if="!$_isShow(userInfo.user_id)" ref="normalFooter"></v-normalFooter> -->
			<v-defooter ref="defooters" :activeIndex="4"></v-defooter>
		</footer>

		<div class="qrcode" v-show="qrcodeMask">
			<div class="qrcode_box">
				<div class="qrcode_close" @click="qrcodeHide">
					<img class="qrcode_close_img" :src="constant.imgUrl + 'center/icon_close.png'" alt="">
				</div>
				<div class="qrcode_img">
					<img :src="storeQrCode" alt/>
				</div>
<!-- <div class="qrcode_remind">有新预约单可以及时获得提醒</div>
<div class="qrcode_remind">保存二维码到相册后进行扫码识别</div>
<div class="qrcode_attention" @click="saveNopublicImg">保存</div> -->
			</div>
		</div>
	</div>
</template>
<script>
import { mapGetters, mapState } from 'vuex'
import Defooter from '@/pages/components/deFooter.vue'
// import NormalFooter from '@/pages/components/normalFooter.vue'
import { jumpOtherUser, isPersonRoleType } from '@/utils/common'

// ===api===
import { getOrderIndex } from '@/api/center'
import { getwallet } from '@/api/payment'
import { getUser } from '@/utils/auth'

export default {
	name: 'center',
	components: {
		'v-defooter': Defooter
		// 'v-normalFooter': NormalFooter
	},
	data() {
		return {
			constant: this.$constant,
			jumpOtherUser: jumpOtherUser,
			storeQrCode: this.$constant.oemObj.publicQrCode,
			moneyData: '',
			// 商城二维码
			qrcodeMask: false,
			// 资料完善度
			orderUserData: {
				congig_percentage: 0
			},
			// 滚动
			scrollOption: {
				step: 1,
				limitMoveNum: 1,
				openWatch: true,
				waitTime: 3000,
				direction: 1,
				singleHeight: 30,
				hoverStop: false
			},
			// myWalleData: {},
			scrollData: [
				{
					text: '完成任务拿现金, 免费获得精准客户'
				},
				{
					text: '每日分享获客案例'
				},
				{
					text: '每日分享获客文章'
				},
				{
					text: '每日分享店铺名片'
				}
			],
			// 菜单按钮 -- start
			menuData: {
				// 内容管理
				conData: [
					{
						name: '用户中心',
						img: `${this.$constant.imgUrl}center/content_menu_icon_1.png`,
						url: '/pages/persondata/index',
						judge: () => true
					},
					{
						name: '案例管理',
						img: `${this.$constant.imgUrl}center/content_menu_icon_2.png`,
						url: '/pages/admin/manage/caseManage',
						judge: () => true
					},
					{
						name: '攻略管理',
						img: `${this.$constant.imgUrl}center/content_menu_icon_3.png`,
						url: '/pages/admin/manage/raidersManage',
						judge: () => true
					},
					{
						name: '工艺管理',
						img: `${this.$constant.imgUrl}center/content_menu_icon_4.png`,
						url: '/pages/admin/manage/processManage',
						judge: () => {
							return this.userInfo.role_id == 4 || this.userInfo.role_id == 5
						}
					},
					// {
					// 	name: '确认职位',
					// 	img: `${this.$constant.imgUrl}center/content_menu_icon_5.png`,
					// 	url: 'Companymanage',
					// 	judge: () => {
					// 		return this.userInfo.role_id == 3
					// 	}
					// },
					{
						name: '项目管理',
						img: `${this.$constant.imgUrl}center/content_menu_icon_7.png`,
						url: '/pages/constructionSite/list',
						judge: () => this.userInfo ? this.userInfo.role_id != 2 : true
					},
					{
						name: '设置',
						img: `${this.$constant.imgUrl}center/content_menu_icon_6.png`,
						url: '/pages/admin/setting/settingindex',
						judge: () => true
					}
				],
				// 店铺管理
				shopData: [
					{
						name: '商品管理',
						img: `${this.$constant.imgUrl}material/icon_goodsmanage.png`,
						url: '/pages/admin/manage/shopManage'
					},
					{
						name: '项目管理',
						img: `${this.$constant.imgUrl}material/icon_customermanage.png`,
						url: '/pages/material/manage/management'
					},
					{
						name: '活动资讯',
						img: `${this.$constant.imgUrl}material/icon_activeconsultation.png`,
						url: '/pages/marketing/deactive'
					},
					{
						name: '设置',
						img: `${this.$constant.imgUrl}center/content_menu_icon_6.png`,
						url: '/pages/admin/setting/settingindex'
					}
					// {
					// 	name: '获客文章',
					// 	img: `${this.$constant.imgUrl}material/icon_activeconsultation.png`,
					// 	url: 'CenterRaiders'
					// }
				],
				// 活动管理
				// activeData: [
				// 	{
				// 		name: '活动设置',
				// 		img: `${this.$constant.imgUrl}center/active_menu_icon_1.png`,
				// 		url: 'Deactive'
				// 	},
				// 	{
				// 		name: '报名礼包',
				// 		img: `${this.$constant.imgUrl}center/active_menu_icon_1.png`,
				// 		url: 'Dejoin'
				// 	}
				// ],
				// 企业管理
				companyData: [
					{
						name: '企业介绍',
						img: `${this.$constant.imgUrl}center/company_menu_icon_1.png`,
						url: '/pages/company/infoEdit',
						query: {
							sources: 'center',
							active: 0
						},
						judge: () => {
							return this.$util.shieldReview()
						}
					},
					{
						name: '我的团队',
						img: `${this.$constant.imgUrl}center/company_menu_icon_2.png`,
						url: '/pages/admin/league/leagueTeamList',
						judge: () => {
							return this.$util.shieldReview()
						}
					},
					{
						name: '员工管理',
						img: `${this.$constant.imgUrl}center/company_menu_icon_3.png`,
						url: '/pages/admin/staffManage/staffManage',
						judge: () => true
					}
					// {
					// 	name: '员工排行',
					// 	img: `${this.$constant.imgUrl}center/company_menu_icon_4.png`,
					// 	url: '/pages/admin/staffManage/memberRanking'
					// }
				],
				// 帮助中心
				helpData: [
					{
						name: '常见问题',
						img: `${this.$constant.imgUrl}center/help_menu_icon_1.png`,
						url: '/pages/admin/helpCenter/problemList',
						judge: () => true
					},
					{
						name: '联系我们',
						img: `${this.$constant.imgUrl}center/help_menu_icon_2.png`,
						function: () => {
							uni.makePhoneCall({
								phoneNumber: this.$constant.oemObj.phoneNumber
							})
						},
						judge: () => true
					},
					{
						name: '微信公众号',
						img: `${this.$constant.imgUrl}center/help_menu_icon_3.png`,
						function: () => {
							this.qrcodeMask = true
							// let imgUrl = this.$constant.oemObj.publicQrCode
							// let arr = []
							// arr[0] = imgUrl
							// uni.previewImage({
							// 	current: imgUrl,
							// 	urls: arr
							// })
						},
						judge: () => true
					},
					{
						name: '会员特权',
						img: `${this.$constant.imgUrl}center/help_menu_icon_4.png`,
						url: '/pages/admin/vip/vipGuide',
						judge: () => {
							return this.$util.shieldReview()
						},
						function: () => {
							this.jumpVipFn()
						}
					}
				]
			},
			// 预约单数据
			reservationData: [
				{
					name: '预约单',
					value: 0,
					url: 'SubscribeOrder',
					query: {
						tabIndex: 1,
						isOrderEnter: true
					}
				},
				{
					name: '可接单',
					value: 0,
					url: 'connectOrderList'
					// url: 'SubscribeOrder',
					// query: {
					//     tabIndex: 2
					// }
				},
				{
					name: '可抢单',
					value: 0,
					url: 'grabOrderList'
				},
				{
					name: '已接单',
					value: 0,
					url: 'SubscribeOrder',
					query: {
						isOrderEnter: true
					}
				}
			],
			// 订单管理
			orderData: [
				{
					name: '待确认',
					value: 0,
					url: '/pages/material/ordermanage/orderList',
					query: {
						actives: 1,
						value: 0
					}
				},
				{
					name: '待付款',
					value: 0,
					url: '/pages/material/ordermanage/orderList',
					query: {
						actives: 2,
						value: 100
					}
				},
				{
					name: '待发货',
					value: 0,
					url: '/pages/material/ordermanage/orderList',
					query: {
						actives: 3,
						value: 101
					}
				},
				{
					name: '已完成',
					value: 0,
					url: '/pages/material/ordermanage/orderList',
					query: {
						actives: 5,
						style: 0,
						value: 102
					}
				}
			],
			// 订单管理菜单
			orderMenuData: [
				{
					name: '今日订单数',
					value: 0,
					text: '个新订单',
					url: '/pages/material/ordermanage/orderList',
					show: 'all',
					query: {
						actives: 0,
						value: -1
					}
				},
				{
					name: '预约报名',
					value: 0,
					text: '个预约',
					url: '/pages/order/subscribeOrder'
				},
				{
					name: '今日营业额',
					value: 0,
					text: '￥',
					textType: 2
				},
				{
					name: '收入资产',
					value: 0,
					text: '￥',
					textType: 2,
					url: '/pages/material/recharge/materialAsset',
					show: 'all'
				}
			]
		}
	},
	onLoad(option) {
		console.log(456)
		let that = this
		that.option = option
		getUser().then(res => {
			// 修改编辑资料的跳转
			// that.menuData.conData[0].url = that.userInfo.role_id == 1 || that.userInfo.role_id == 2 ? '/pages/persondata/index' : '/pages/persondata/index'
			this.init()
		})
	},
	onPullDownRefresh() {
		this._getOrderIndex()
		this._getwallet().then(() => {
			uni.stopPullDownRefresh()
		})
	},
	// onShow() {
	// 	this._getOrderIndex()
	// 	this._getwallet().then(() => {
	// 		uni.stopPullDownRefresh()
	// 	})
	// },
	computed: {
		...mapGetters({ userInfo: 'getUser' })
		// 修改编辑资料的跳转
		// editInfoPath() {
		// 	return this.userInfo.role_id == 1 || this.userInfo.role_id == 2 ? '/pages/persondata/index' : '/pages/persondata/index'
		// }
	},
	methods: {
		// myWallet() {
		// 	console.log(456)
		// 	getMyWallet().then((res) => {
		// 		console.log(res)
		// 		this.myWalleData = res.data
		// 	})
		// },
		init() {
			this._getOrderIndex()
			this._getwallet()
		},
		// ==预约单数据==
		_getOrderIndex() {
			getOrderIndex().then(res => {
				if (res.status === 'success') {
					let data = res.data
					this.orderUserData = data
					this.reservationData[0].value = parseInt(data.prebook) || 0
					this.reservationData[1].value = parseInt(data.paidan) || 0
					this.reservationData[2].value = parseInt(data.can_rush) || 0
					this.reservationData[3].value = parseInt(data.is_recruit) || 0

					// 建材商城数据
					// if (this.userInfo.role_id == 2) {
					this.orderData[0].value = parseInt(data.await_confirmed) || 0
					this.orderData[1].value = parseInt(data.await_pay) || 0
					this.orderData[2].value = parseInt(data.await_ship) || 0
					this.orderData[3].value = parseInt(data.received) || 0

					this.orderMenuData[0].value = parseInt(data.today_order) || 0
					this.orderMenuData[1].value = parseInt(data.prebook) || 0
					this.orderMenuData[2].value = data.today_order_amount || 0
					this.orderMenuData[3].value = data.seller_money || 0
					// }
				}
			})
		},
		// ==钱包页面数据==
		async _getwallet() {
			let data = {
				ru_id: this.option.owner_user_id
			}
			await getwallet(data).then(res => {
				if (res.status === 'success') {
					this.moneyData = res.data
				}
			})
		},
		// 显示微信公众号二维码
		qrcodeHide() {
			this.qrcodeMask = false
		},
		// 到预约单
		skiptoclient() {
			this.$router.push({
				name: 'SubscribeOrder',
				query: {
					owner_user_id: this.$route.query.owner_user_id
				}
			})
		},
		// 到我的任务页面
		skiptomission() {
			let query = {
				owner_user_id: this.userInfo.user_id,
				has_recharge: this.moneyData.has_recharge
			}
			uni.navigateTo({
				url: `/pages/integral/myMission${this.commonJS.queryData(query)}`
			})
		},
		// 到订单列表
		jumporder() {
			let query = {
				owner_user_id: this.userInfo.user_id,
				actives: 0,
				value: -1
			}
			uni.navigateTo({
				url: `/pages/material/ordermanage/orderList${this.commonJS.queryData(query)}`
			})
		},
		// 去完善资料
		toDecoration() {
			uni.navigateTo({  // 到资料编辑页面
				url: `/pages/persondata/index?owner_user_id=${this.userInfo.user_id}`
			})
		},
		// 去会员特权页面
		jumpVipFn() {
			let roleType = ''
			if (isPersonRoleType(this.userInfo.role_id)) {
			    roleType = 1
			} else {
			    roleType = 0
			}
			let url = this.constant.oemSource == 4 && roleType == 0 ? `/pages/admin/vip/vipGuideHKDS` : `/pages/admin/vip/vipGuide`
			uni.navigateTo({
				url: url
			})
		},
		// 去余额页
		jumpWithdraw() {
			let query = {
				owner_user_id: this.userInfo.user_id,
				has_recharge: this.moneyData.has_recharge
			}
			uni.navigateTo({
				url: `/pages/balance/index${this.commonJS.queryData(query)}`
			})
		},
		jumpincomecast() { // 到积分充值页面
			let query = {
				owner_user_id: this.userInfo.user_id,
				has_recharge: this.moneyData.has_recharge
			}
			uni.navigateTo({
				url: `/pages/integral/intergralMain${this.commonJS.queryData(query)}`
			})
		},
		// 跳转订单页面
		goOrder(item) {
			let query = {
				owner_user_id: this.userInfo.user_id,
				actives: item.query.actives,
				value: item.query.value,
				style: item.query.style
			}
			uni.navigateTo({
				url: `/pages/material/ordermanage/orderList${this.commonJS.queryData(query)}`
			})
		},
		/**
			 * 功能按钮跳转相应的页面
			 * @parmas item.type 1 为自身的跳转，2为商城的跳转, 3为商城带id的跳转
			 */
		jumpMenuFn(item) {
			console.log('跳转', item)
			if (item.function) {
				item.function()
			}
			if (item.type == 2) {
				jumpShop(item.url, this.userInfo.user_picture)
				return false
			}
			if (item.type == 3) {
				jumpShop(item.url + this.userInfo.user_id, this.userInfo.user_picture)
				return false
			}
			if (item.url) {
				let currentQuery = {}
				if (!this.$util.isEmpty(item.query)) {
					currentQuery = item.query
				}
				let query = {
					owner_user_id: this.userInfo.user_id,
					...currentQuery
				}
				uni.navigateTo({
					url: `${item.url}${this.commonJS.queryData(query)}`
				})
			}
		},
		// 保存公众号二维码
		saveNopublicImg() {
			uni.getImageInfo({
				src: this.storeQrCode,
				success: imgInfo => {
					uni.saveImageToPhotosAlbum({
						filePath: imgInfo.path,
						success: () => {
							uni.showToast({
								title: '已保存到相册',
								icon: 'success'
							})
						},
						fail: (e) => {
							console.log(e)
							uni.showToast({
								title: '保存失败',
								icon: 'none'
							})
						}
					})
				}
			})
		}
	}
}
</script>
<style lang="scss" scoped>

	.iconfont {
		display: inline-block;
		vertical-align: middle;
	}

	a {
		text-decoration: none;
	}
	.uni-progress {
		width: 30%;
		margin-right: 15px;
	}

	.uni-progress-info {
		font-size: 12upx;
	}

	.centerbox {
		padding-top: 38px;
		padding-bottom: 120px;
		background-image: url($imgUrl+ 'center/back_top.png');
		background-size: 100% auto;
		background-repeat: no-repeat;
		background-color: #f5f5f5;
		// 公共
		.module_wrap {
			border-radius: 20px;
			background-color: #fff;
			margin: 0 25px 20px;
			box-shadow: 0 10px 20px #ededed;

			.module_title_wrap {
				@include direction(center, space-between);
				padding: 24px;
				border-bottom: 0.5px solid $borderColorMain; /*no*/
				.module_title_text {
					font-size: 30px;
					font-weight: 600;
				}

				.module_title_more {
					@include disFlexCen();
					color: $fontColor2;
					span {
						margin-right: 10px;
					}

					i {
						font-size: 24px;
					}
					div{
						display: inline-block;
						vertical-align: middle;
					}
				}
			}

			.company_index {
				font-size: 32px !important;
				margin-right: 6px;
			}
			.module_content_wrap {
				// 按钮快
				.menu_btn_wrap {
					display: flex;
					align-items: center;
					flex-wrap: wrap;

					.menu_list {
						width: 25%;
						text-align: center;
						padding-top: 40px;
						padding-bottom: 40px;

						a {
							color: #333;
						}

						.menu_list_img {
							width: 50px;
							height: 50px;
							margin: 0 auto 14px;
						}
					}
				}
			}
		}

		// 用户资料
		.userInfo_wrap {
			.userInfo_wrap_top {
				padding: 40px 15px 40px 20px;
				@include disFlexCen();
				color: $fontColor2;

				.attr_wrap {
					// flex-shrink: 0;
					width: 160px;
					height: 160px;
					border-radius: 50%;
					border: 0.5px solid $borderColorMain; /*no*/
					margin-right: 20px;

					img {
						width: 140px;
						height: 140px;
						border-radius: 50%;
						margin: 10px;
					}
				}

				.user_info_wrap {
					width: calc(100% - 180px);

					& > div {
						margin-top: 14px;
					}

					.user_name_wrap {
						@include disFlexCen();
						margin-top: 0;

						.user_name {
							max-width: calc(100% - 50px);
							font-size: 36px;
							color: #333;
							margin-right: 10px;
							font-weight: 600;
						}

						.user_vip {
							width: 40px;
							height: 34px;
						}
					}

					.user_info {
						@include direction(center, space-between);

						.speed {
							margin-left: 10px;
							font-size: 24px;
						}

						.user_info_left {
							@include disFlexCen();
							flex: 0.9;
							progress {
								flex: 1;

							}
						}
						.wirte_all {
							@include disFlexCen();
							text-align: right;
							i {
								font-size: 24px;
							}
						}
					}
				}
			}

			.userInfo_wrap_bottom {
				/*height: 80px; !*no*!*/
				padding: 0 20px 0 12px;
				background-color: #fff8da;
				border-bottom-left-radius: 20px;
				border-bottom-right-radius: 20px;
				@include disFlexCen();
				flex: 1;

				.task_wrap {
					width: 100%;
					/*height: 80px; !*no*!*/
					/*overflow: hidden;*/
					.task_scroll_wrap {
						height: 80px;

						.list_item_wrap {
						}

						.list_item {
							@include direction(center, space-between);

							.list_item_left {
								@include disFlexCen();

								span {
									margin-left: 10px;
									line-height: 80px;
									font-size: 24upx;
									overflow: hidden;
								}

								i {
									font-size: 40px;
								}
							}

							.task_btn {
								height: 100%; /*no */
								color: $auxiliaryColor1;
								background-color: $mainColor;
								padding: 14px;
								@include direction(center, center);
								border-radius: 50px;

								span {
									margin-right:5px;
									margin-left:10px;
									// margin-bottom: 2px;
								}

								i {
									font-size: 24px;
								}
							}
						}
					}
				}
			}
		}
		.vip_wrap {
			img {
				height: auto;
			}
		}

		// 订单管理
		.order_wrap {
			.order_con_top {
				@include disFlexCen();
				height: 138px;
				color: $fontColor3;

				.order_list {
					width: 25%;
					text-align: center;

					.text_main_color {
						font-size: 34px;

					}
					.orderName{
						margin-top: 8px;
					}
				}
			}

			.order_con_bottom {
				@include direction(flex-start, space-between);
				color: $fontColor3;
				padding: 20px 24px;
				// border-top: 0.5px solid $borderColorMain; /*no*/
				& > div {
					width: 49%;

					& > div {
						margin: 10px;
					}
				}

				i {
					font-size: 24px;
				}

				.commission_price {
					color: #333;
					font-size: 42px;
					margin-top: 18px !important;
					margin-bottom: 18px !important;
				}

				.commission_num {
					color: #333;
					margin-left: 4px;
				}

				.commission_right_wrp {
					span {
						color: #999;
					}

					border-left: 0.5px solid $borderColorMain; /*no*/
					div {
						margin: 10px 10px 10px 30px;
					}
				}
			}

			.mater_con_bottom {
				@include disFlexCen();
				flex-wrap: wrap;
				padding: 20px 0;
				border-top: 0.5px solid $borderColorMain; /*no*/
				.mater_wrap {
					width: calc(50% - 70px);
					@include direction(center, space-between);
					padding: 20px 34px;
					border-right: 0.5px solid $borderColorMain; /*no*/
					.text_sub_com {
						margin-bottom: 22px;
					}
				}

				.mater_wrap:nth-child(n + 3) {
					border-bottom: none; /*no*/
				}

				.mater_wrap:nth-child(2n) {
					border-right: none; /*no*/
				}
			}
		}

	.qrcode {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background-color: rgba(0,0,0,.5);
		z-index: 9999;
		& .qrcode_box {
			position: absolute;
			left: 0;
			top: 0;
			right: 0;
			bottom: 0;
			margin: auto;
			padding-top: 100px;
			width: 490px;
			height: 630px;
			// height: 595px;
			background-color: #fff;
			border-radius: 15px;
			box-sizing: border-box;
			& .qrcode_close {
				position: absolute;
				right: 24px;
				top: 24px;
				width: 60px;
				height: 60px;
				@include direction(center, center);
				// background: url($imgUrl+'center/icon_close.png') center center / 100% 100% no-repeat;
				.qrcode_close_img {
					// margin: 5px;
					width: 30px;
					height: 30px;
				}
			}
			& .qrcode_img {
				margin: auto;
				width: 300px;
				height: 300px;
			}
			& .qrcode_img .erweima {
				width: 100%;
				height: 100%;
			}
			& .qrcode_attention {
				@include direction(center, center);
				width: 60%;
				margin: 30px auto 0;
				font-size: 30px;
				color: $auxiliaryColor1;
				text-align: center;
				padding: 10px 0;
				background-color: $mainColor;
				border-radius: 50px;
			}
			& .qrcode_remind {
				margin-top: 20px;
				font-size: 30px;
				color: #999;
				text-align: center;
			}
		}
	}

		img {
			width: 100%;
			height: 100%;
			display: block;
		}
		.separate_text {
			margin: 0 6px;
		}
	}
</style>
